package com.smartcommunity.entity.ac;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang.StringUtils;

/**
 * 
  * @ClassName: OpenRecord
  * @Description: 开门记录
  * @author
  * @date 2018年1月9日 下午1:23:15
  *
 */
@Data
@EqualsAndHashCode()
public class OpenRecord {
    /**
      * @Fields serialVersionUID
      */
    private static final long serialVersionUID = 1L;
    private String id;
    private String villageCode;
    private String recordId;
    private String deviceId;
    private String cardNo;
    private String openTime;
    private String openType;
    private String imgUrl;
    private String videoUrl;
    private String mrowTime;
    
    /**
     * 人员名称
     */
    private String peopleName;
    /**
     *
     */
    private String credentialNo;

    /**
     * 身份证
     */
    private String credentialType;
    /**
     * 是否有图片
     */
    private String hasImg="0";
    /**
     * 是否有视频
     */
    private String hasVideo="0";
    /**
     * 门禁设备名称
     */
    private String deviceName;

    /**
     * 感知类型
     */
    private String senseType = "0";
    
    /**
     * 楼栋
     */
    private String buildingNo;
    /**
     * 房屋编码
     */
    private String houseNo;

    public void setImgUrl(String imgUrl) {
        if(StringUtils.isNotEmpty(imgUrl)) {
            this.hasImg="1";
        }  
        this.imgUrl = imgUrl;
    }

    public void setVideoUrl(String videoUrl) {
        if(StringUtils.isNotEmpty(videoUrl)) {
            this.hasVideo="1";
        }        
        this.videoUrl = videoUrl;
    }
    
}
